home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / comm / bbs / FilePather13.lha / FilePather / Docs / FilePather.doc < prev    next >
Encoding:
Text File  |  1995-04-07  |  20.0 KB  |  531 lines

  1.  ----------------------------------------------------------------------------
  2.  
  3.                              FilePather 1.3
  4.  
  5.                                   by
  6.  
  7.                               Johan Torin
  8.  
  9.               Approved and endorsed by Users Standards Group
  10.  
  11.  ----------------------------------------------------------------------------
  12.  
  13.     The programs and files in this distribution are freely distributable, as
  14.  long as the archive remains intact, but are also Copyright © Johan Torin.
  15.  They may be freely distributed as long as no more than a nominal fee is
  16.  charged to cover time and copying costs. None of the files can be included
  17.  with commercial distributions without written permission from the author.
  18.  
  19.     This product is provided as is without warranties of any kind: the
  20.  author of this program cannot be held liable for any defects in the
  21.  executable nor in the documentation or in any other files contained in
  22.  this package. Any damage directly or indirectly caused by the use/misuse
  23.  of FilePather is the sole responsibility of the user her/him self.
  24.  
  25.  However, if  you  use  this  program  you  MUST send a message to me! Either
  26.  through email, or by  ordinary  snail mail.  This is in your own interest if
  27.  you want continued development of this project.
  28.  
  29.  
  30.  What it does
  31.  ------------
  32.  FilePather will add a configurable line to a file called 'FilePath.lst' in
  33.  archives or add the line in a textfile just before the '@End_FilePath.lst'.
  34.  Repeated usage (BBSs, users) will create a list which will tell the history of
  35.  the file, ie when it was where and by who. The name 'FilePath' has nothing to
  36.  do with searchpath. Instead it is the PATH the FILE has taken to come to you.
  37.  
  38.  Features
  39.  --------
  40.  · Processes both standard archives & text files.
  41.  · Totally configurable. Easy to add new archivers.
  42.  · Built in AdStripper for text files!
  43.  · Creates a database over names found if used in conjunction with FPBase.
  44.  · Throughport - run other fileprocessors directly from FilePather.
  45.  · Pure! That is; it can be made resident!
  46.  · 100% assembler.
  47.  · Enforcer & Mungwall proof.
  48.  · Requires 2.04 to run (V37).
  49.  
  50.  I have tried to make the utility suit both the normal user/bbs and the
  51.  'elite' trader/board.
  52.  
  53.  Why?
  54.  ----
  55.  Don't you hate ads?! But in the same time you enjoy reading them since
  56.  they might came from a new BBS or somewhere extremly far away like Asia,
  57.  Australia or Säffle.
  58.  
  59.  FilePather was invented to provide a way of getting as much information as
  60.  possible from as little bytes and files as possible. When you look in the
  61.  'FilePath.lst' file you can see all the steps the file has taken before it
  62.  camed to you (provided all boards use FilePather =).
  63.  It also makes it possible to add YOUR signature to a file without adding
  64.  any extra files to an archive or more than 1 line of text to a textfile.
  65.  
  66.  And also, the AdDeleter for text files is extremly useful provided that
  67.  FilePather has been used from the beginning. I took 20 random textfiles
  68.  from my download directory and manually edited them so @Start_of_text and
  69.  @End_of_text just enclosed the real text. After running FilePather the
  70.  total size had decreased from 406946 to 297029 bytes, a decrease by
  71.  109917 bytes. And that was RANDOM files! Some where from PD boards and
  72.  some had been in Lha archives. So the actual performace may be bigger,
  73.  it's depends on if the file has been FilePatherized before. As an example
  74.  I can mention that a file on 38k suddenly became 4k after FilePather...
  75.  
  76.  Installation
  77.  ------------
  78.  The provided installation script uses Commodores Installer utility, which
  79.  you can find in several modern commercial and PD packages. The reason why
  80.  I didn't included Installer is the filesize, over 100Kb. Ask your sysop
  81.  for it.
  82.  
  83.  The installation script will install the executable and ask you for
  84.  information like your name, location, phonenumber etc. These will
  85.  be stored as environment variables in ENV:, so you don't have to think
  86.  about entering difficult command strings. The script will also help the
  87.  ordinary user with installing of a simple method of getting all your
  88.  downloaded files FilePathed.
  89.  
  90.  Template
  91.  --------
  92.  
  93.   FilePather [File] <file> Type <type> Name <name> [SysOp <sysop>]
  94.   Location <location> Number <number(s)> [Custom <Custom_n=<string>>]
  95.   [NextCommand <commandline>] [Workdir <workdir>] [SaveList <list>]
  96.   [VarDir <dir>]
  97.  
  98.  Keywords can be typed in with any case mixture and can be entered in
  99.  any order. Strings may be enclosed with double quotes (") OR single
  100.  quotes ('), but it is only neccesary when the string contains spaces.
  101.  Keywords enclosed with [] are optional.
  102.  
  103.  Explanation of keywords:
  104.  [File] <file|dir>        The file or directory to process. The switch
  105.                 'FILE' are not neccesary, but then MUST the
  106.                 filename be first on the commandline.
  107.                 If a directory is specified, all files in
  108.                 that directory will be processed. Note! FP
  109.                 will not enter any subdirs!                
  110.  
  111.  Type <type>            The type of the person/program that started
  112.                 FilePather. ie. User,BBS,Trader,Board.
  113.  
  114.  Name <name>            The name of the person/BBS etc that
  115.                 started the fileprocessing. ie. Mitnick,
  116.                 John Smith, Inside Out.
  117.  
  118.  [SysOp <sysop>]        The sysops name if applicable.
  119.  
  120.  Location <location>        Either the geographic location or the group.
  121.  
  122.  Number <number(s)>        Number to the Person/Board. Should
  123.                 look like this: +Country code-(MIGHT be
  124.                 unneccesary digits)Areacode-Number_1|
  125.                 Number_2|Number_n
  126.                 ie. +46-0346-58697|59245
  127.                 If there are no number or you doesn't
  128.                 like to leave it out, set it to 'UNPUBL'.
  129.  
  130.  [Custom]            This is an extension of the normal fields.
  131.                 For example:
  132.                 Size_of_HD=30Gb
  133.                 Amount_of_RAM=56Mb
  134.                 Processor=68060
  135.                 ClockFrequency=66Mhz
  136.                 Geographic_location=Säffle,Sweden
  137.                 Legend="As faster as better!"
  138.                 These are placed last on the 'FilePath.lst'
  139.                 line and are optional and totally up to you
  140.                 to decide about. However should you try to
  141.                 follow existing standards and not invent new
  142.                 fields if it already exists an appropriate
  143.                 one. See the file 'Custom_fields.txt'
  144.                 for more information.
  145.  
  146.  [NextCommand <commandline>]     FilePather can spawn a new command which can
  147.                 be of interest in some BBS systems, which are
  148.                 only able to start ONE filechecker. Specify
  149.                 the command you want to be execute, putting
  150.                 '%f' (lowercase!) there you want the
  151.                 filename, and it will be started when
  152.                 FilePather is done. Use single quotes
  153.                 to enclose the NextCommand string. ie.
  154.                 NextCommand 'Echo "The file %f has been
  155.                 processed!"' ). If you want to redirect
  156.                 the command to a file, eg NIL:, then use
  157.                 the '%«' and '%»' instead of '<' and '>'
  158.  
  159.  [Workdir <workdir>]        The directory there temporary files will be
  160.                 placed. Default is 'T:'. Must have either a
  161.                 ':' or a '/' appended on it.
  162.  
  163.  [Savelist <savelist>]        Specifies the temporary file there the
  164.                 extracted 'FilePath.lst's will be appended.
  165.                 FilePather checks if FPBases public port
  166.                 can be found. If so, this filename will be
  167.                 passed for ASYNCRONOUSLY processing! ie:
  168.                 FilePather may (and will) quit before
  169.                 FPBase does. It might be be a good idea
  170.                 to use separate files if FilePather somehow
  171.                 is runned in multiple copies, as in a
  172.                 multinode BBS.  (See the FPBase
  173.                 documentation for more information).
  174.  
  175.  [VarDir <dir>]            If specified, FilePather will load its
  176.                 environment variables from this directory,
  177.                 thus make it possible to store them on disk
  178.                 instead of your precious memory. Note that
  179.                 the path MUST end with either ':' or '/'.
  180.  
  181.  [Notify]            This keyword will enable Notify mode, ie
  182.                 FilePather will use FileSystem notify to
  183.                 autodetect files in a directory. This can
  184.                 be used to autoprocess up- or downloaded
  185.                 files if not a better solution exists.
  186.                 In this mode you can exit FilePather by
  187.                 sending it a Ctrl-C or D. Ctrl-C will
  188.                 immediately abort and quit FilePather, while
  189.                 Ctrl-D will tell FilePather to quit when
  190.                 there are no more files left. This trick can
  191.                 be used if the process number is unknown:
  192.                 Break D `Status com=C:FilePather`
  193.  
  194.  [TaskPri <taskpri>]        This keyword sets the taskpriority for
  195.                 FilePather. Normally you shouldn't use
  196.                 values higher than 10 or lower than 10.
  197.                 It might be a good idea to check the
  198.                 priority of other tasks running at the
  199.                 same time as FilePather to make sure
  200.                 that they don't supress FilePather from
  201.                 running. This keyword is provided to be
  202.                 used in conjunction with NOTIFY, but may
  203.                 be used as wanted.
  204.  
  205.  
  206.  Entering no arguments will show the template.
  207.  
  208.  Environment variables
  209.  ---------------------
  210.  
  211.  Almost all command line keywords have a corresponding env. variable.
  212.  This way it's possible to easy load the settings, and you doesn't have
  213.  to struggle with the commandline each time you want to execute FilePather.
  214.  These env. variables are used by FilePather 1.3:
  215.   Type
  216.   Name
  217.   SysOp
  218.   Location
  219.   Number
  220.   Custom
  221.   SaveList
  222.   NextCommand
  223.   FP_PrefsDir
  224.  
  225.  The last one, 'FP_PrefsDir', must reside directly in ENVARC:/ENV:, as
  226.  it holds path to the directory where all other variables are loaded from.
  227.  Thus it's possible to store the env. variables on another device than
  228.  the ram disk. This variable is shared with FPBase. If the variable isn't
  229.  found, FPBase will default to 'ENV:FilePather/'.
  230.  
  231.  Be careful to NOT enter any linefeeds in the variables that are used
  232.  for the FilePather line! These are also put on the line, forcing the
  233.  FilePather line to actually be two or more lines! _Always_ check the
  234.  line output after editing the variables!
  235.  
  236.  Furthermore, FilePather tries to load environment variables with
  237.  names based on the files suffix, to use when extracting/updating
  238.  the FilePath.lst. Se 'Configuration of (un)packers' for more
  239.  information. The information provided in that section applies for
  240.  the NextCommand variable as well.
  241.  
  242.  Example command lines
  243.  ---------------------
  244.  
  245.  FilePather "Data:Download/Coolness.lha" Type "Board" Name "Inside Out"
  246.   SysOp "Cateye" Location "Insane^Reflex" Number "+46-0346-58697|59245"
  247.   NextCommand 'IStrip "%f"' Workdir "Dh0:Temp/"
  248.  
  249.  To run it from DirOpus (%f = insert filename here (for Dopus!)):
  250.  FilePather File "%f" Type "User" Name "Mitnick" Location "Reflex"
  251.   Number "+46-035-UNPUBL"
  252.  
  253.  Or, when using the environment variables:
  254.  FilePather "Data:Download/Enf3762.lha" Custom 'Legend="As faster as better!"'
  255.  
  256.  Notice the use of single quotes since the string itself contains
  257.  doublequotes!
  258.  
  259.  To autoscan a directory for files:
  260.  FilePather DATA:Tmp_DL/ Notify NextCommand 'Rename "%f" DATA:Download/'
  261.  
  262.  NOTE! Don't forget to move the file after the processing! Look in
  263.  'Tricks.txt' for more information!
  264.  
  265.  
  266.  Finally, if you want to add some more custom fields to the string in
  267.  the env. variable, use this 'trick':
  268.  FilePather "Enf3762.lha" Custom '${FilePather/Custom} Node=8'
  269.  
  270.  The contents of the environment variable 'ENV:FilePather/Custom' will
  271.  be inserted on the command line before 'Node=8'.
  272.  
  273.  
  274.  The text ad deleter
  275.  --------------------
  276.  When FilePather process a text file it will strip all text before
  277.  '@Start_of_text' and all text after '@End_of_text'. If not found it will
  278.  add them so that next time the file is processed, FilePather (or any other
  279.  tool supporting this) will strip eventual ads.
  280.  
  281.  Also, the FILE_ID.DIZ text will be moved to the top of the file. For
  282.  example, if the file looked like this:
  283.  ----------------------------------------------------------------------------
  284.  /\/\/\/\/\/\/\/\
  285.  > FrontBanner! <
  286.  \/\/\/\/\/\/\/\/
  287.  @Begin_FilePath.lst
  288.  Board    Inside Out        Cateye/Insane        03:24 27-08-94 +46-0346-58697|59245 Size_HD=500Mb Legend="As faster as better!"
  289.  @End_FilePath.lst
  290.  @Start_of_text
  291.  
  292.  Text 1
  293.  
  294.  @BEGIN_FILE_ID.DIZ----------------------------------
  295.  |  Einstein rules relatively ok! |
  296.  ----------------------------------
  297.  @END_FILE_ID.DIZ
  298.  
  299.  Text 2
  300.  
  301.  @End_of_text
  302.  /\/\/\/\/\/\/\/\
  303.  > BackBanner!! <
  304.  \/\/\/\/\/\/\/\/
  305.  ----------------------------------------------------------------------------
  306.  
  307.  It will look like this after FilePatherizing:
  308.  ----------------------------------------------------------------------------
  309.  @Begin_FilePath.lst
  310.  Board    Inside Out        Cateye/Insane        03:24 27-08-94 +46-0346-58697|59245 Size_HD=500Mb Legend="As faster as better!"
  311.  User    Mitnick            Reflex            18:26 28-08-94 +46-035-UNPUBL
  312.  @End_FilePath.lst
  313.  @BEGIN_FILE_ID.DIZ----------------------------------
  314.  |  Einstein rules relatively ok! |
  315.  ----------------------------------
  316.  @END_FILE_ID.DIZ
  317.  @Start_of_text
  318.  
  319.  Text 1
  320.  
  321.  
  322.  Text 2
  323.  
  324.  @End_of_text
  325.  ----------------------------------------------------------------------------
  326.  
  327.  If you like to add the strings to the textfiles you write yourself,
  328.  I suggest that you make a macro in your texteditor that:
  329.   Jumps to the beginning of the file.
  330.   Inserts '@Start_of_text'.
  331.   Jumps to the end of the file.
  332.   Inserts '@End_of_text'.
  333.  This is easier and safer (no spell errors).
  334.  
  335.  
  336.  Other archive formats
  337.  ---------------------
  338.  But DMS when?! Well, as long as not anyone else write support for it, you
  339.  have to live without it! I had thoughts about adding internal support for
  340.  DMS archives, but after looking at the fileformat for DMS I dropped that
  341.  project. LhA 3.0 is said to have track compression, and will probably
  342.  (hopefully) take DMS's role as the main track compression program. DMS
  343.  really sucks...
  344.  
  345.  For various file oriented archives I have already prepared for the
  346.  implementation of those.
  347.  
  348.  Configuration of (un)packers
  349.  ----------------------------
  350.  
  351.  (The information provided in this section more or less applies for the
  352.  NextCommand variable/keyword as well.)
  353.  
  354.  When FilePather examines a file it tries to get two environment variables
  355.  with the names '.(suffix)_extract' and'.(suffix)_update'. For example:
  356.  '.Lha_extract' and '.Lha_update'. The extract string may look something
  357.  like this:
  358.  Lha e -q "%f" FilePath.lst "%t/"
  359.  
  360.  and the update string:
  361.  Lha u -q "%f" "%t/FilePath.lst"
  362.  
  363.  '%f' will be expanded to the archive filename and '%t' will be expanded to
  364.  the work directory looking like; (Workdir)(Random dir name), for
  365.  example: 'T:090fe93a'. T: is the default but may be changed with the
  366.  'Workdir' option. An complete expanded string:
  367.  Lha e -q "Ram:intel.lha" FilePath.lst "T:090fe93a/"
  368.  
  369.  
  370.  Here is a list of all percent strings used in FilePather. Note that some
  371.  of them are probably only useful internally. '%%' may be used instead of
  372.  '%' if neccesary.
  373.  
  374.  Char   String
  375.  ------------------------------------------------------------------------
  376.  f    The object filename as entered on the command line.
  377.  t    Temporary work directory. Workdir+Random, ie 'T:900ec120'
  378.  v    Environment variable directory.
  379.  s    The suffix of the file (eg. '.lha'.
  380.  «    The '<' sign.
  381.  »    The '>' sign.
  382.  =    Nothing. Specifying this will force FilePather to put the return
  383.     code from the executed command through to the Dos. This way a
  384.     filechecker may be used in the the Nextcommand OR the extract/update
  385.     strings.
  386.  
  387.  
  388.  Currently there is one internal mode. Setting the extract string to
  389.  'INTERNAL_TXT' forces FilePather to treat the file as text.
  390.  
  391.  Note that the suffix might be longer or shorter than 3 characters. For
  392.  example: '.guide' or '.h8'.
  393.  
  394.  NOTE! From FilePather 1.3 is it possible to more or less use the
  395.  environment variables as script files.
  396.  
  397.  
  398.  Making it resident
  399.  ------------------
  400.  Well, for you out there with no idea how to make a command resident I will
  401.  show you how:
  402.  
  403.  Resident C:FilePather PURE
  404.  
  405.  (Put it in your User-Startup or likewise)
  406.  PURE incase the P bit isn't set in the protection mask. FilePather will
  407.  now run much faster since it doesn't have to reload from disk each time.
  408.  Speed ((have you seen the movie? Quite cool!)) will also increase if you
  409.  make LhA and other archivers resident. 
  410.  
  411.  History
  412.  -------
  413.  1.0 - 9 Sep 1994
  414.     · Wrote it. Many betatests and changes. The FP line was redesigned
  415.        a few times.
  416.  1.1ß - Never released
  417.     · Fixed silly bug that supressed the output of the filename. The file was
  418.        processed though.
  419.     · Added the 'SaveList' keyword and interfacecode for FPBase.
  420.     · Fixed text output speed which was REALLY slow. Still more to do
  421.        in that area...
  422.     · Lost count on things added. Lots of stuff where fixed.
  423.  1.2ß - 29 Jan 1995 - Betarelease
  424.     · Made the fields wider by adding more TABS.
  425.     · If an archive didn't exist, FP would create a new one! Now fixed.
  426.     · FP would crash if a textfile was too small! (Only in FP 1.1)
  427.     · Added workaround for bug in ParNFS (ParNet). 4 bytes long :)
  428.     · Added code for processing whole directories.
  429.     · Fixed silly mistake in the GetVar() code. Now possible to have
  430.        strings with more than one line. Thanks to NeuroDancer for this one!
  431.     · Added the VarDir keyword and the FP_PrefsDir env. variable. Another
  432.        NeuroDancer idea, although I had planned for it.
  433.     · Rewrote the installation script. (OPS! Major bugs in that one!)
  434.     · Finally fixed the scriptfile. Still stuff to do there!
  435.     · Fixed various bugs.
  436.  1.3ß - 20 Feb 1995
  437.     · Fixed bugs in installation script. (NeuroDancer & Peter Bornhall)
  438.     · Added break CTRL-C code when processing whole directory.
  439.     · Added Notify code, to autodetect (down/uploaded) files in a directory.
  440.     · FP would insert a TAB in the line, even if there was no Custom field.
  441.     · Added the %=, %«, and %» strings.
  442.  1.3 - 8 April 1995
  443.     · Changed the Lha & Lzh update variables to default to non-recursive
  444.        collecting. Discovered by the one and only: Kent Larsson! :)
  445.     · FilePather would return weird returncodes.      (Henric Andersson)
  446.     · Edited the guide file from Dreamer (sorry! :) Thanks!
  447.  
  448.  
  449.  Bugs
  450.  ----
  451.  · The same date and time will be used on all files in a directory.
  452.  · The FilePath.lst file is not always deleted from the temporary directory
  453.     on some systems. Looks to have something to do with the
  454.     phase of the moon...
  455.  
  456.  To do
  457.  -----
  458.  · NextCommand environment variables for each suffix - like extract/update.
  459.  · Safe saves in text mode?
  460.  · More help on installing it on a BBS.
  461.  · 'Previous Lines Format Checker' - Delete illegal lines!
  462.  · Extract FileId.diz and FileDesc and add them together with the filename
  463.     to a file, thus creating a list over all files downloaded.
  464.  · Possiblity to recognize files by their contents (ie. pictures, modules,
  465.     etc.) and add the FilePather line in the file. Should be no sweat for
  466.     IFF files. This will probably require external extractors/updaters.
  467.  · The notify code isn't really that nice. Ok, it works, but...
  468.  
  469.  FP Utilities I want to see/make
  470.  -------------------------------
  471.  
  472.  For BBSs:
  473.   Name checker - Warn about a specific BBS/User who have touched the file!
  474.  
  475.  For users:
  476.   FilePath.lst viewer - Present all information from each line in a nice way
  477.   Text file ad deleter - Delete ads and set @Start/End_of_text (user control)
  478.  
  479.  Other BBS utils:
  480.   SuperNuker - Give 10*(total sum of _unpacked_ ads) in minus credits!
  481.             That will show them!
  482.  
  483.  Acknowledgements
  484.  ----------------
  485.  
  486.  Disclaimer stolen from some PD archives. (WHO has written that text
  487.  orginally?) Icons stolen. Layout of doc stolen. Source NOT stolen!
  488.  
  489.  First, a big thanks to my beta testers (random):
  490.   Anders Gustafsson
  491.   NeuroDancer/Abyss  (German support and clever suggestions)
  492.   Kent Larsson
  493.   Peter Bornhall     (Lots of ideas and brainstorming)
  494.   Daniel Celion
  495.   Vicente Nicola     (My support board! :)
  496.   John Hertell AKA Chucky/Virtual (For almost writing the AmiX help! :)
  497.   Magnus Johnson
  498.   Henric Andersson
  499.   Martin Larsson
  500.   Micke Persson
  501.  
  502.   I KNOW I have forgot someone here! :) Mail me if you want be in the list!
  503.  
  504.  Some hi and ho to (random):
  505.  Xerxes/FLT^RLX - A shame I don't call more often!
  506.  Franky/Purple Turtle (Belgium) - Hope to see you at the next Party!
  507.  Anti-g/Sht!/Unl. (Germany) - For the Tempest installation text.
  508.  dReamer/sHoot!/1oo%! - For the .Guide file! It's really nice! Sorry for
  509.                         ruining your layout! :)
  510.  All the sysops on the boards I call and all I have forgotten...
  511.  All nice people that have emailed me and I have forgot...
  512.  My faithful Amys...
  513.  
  514.  How to contact me
  515.  -----------------
  516.  
  517.  Preferably you send e-mail to:
  518.  Fido:     2:203/804.13
  519.  Email:    JTorin@Academy.Bastad.se  or
  520.            JT@p13.f804.n203.z2.Fidonet.Org
  521.  
  522.  Try calling Wedlock BBS - +46-(0)35-186514 - 2:203/807.0@Fidonet
  523.  
  524.  Or (last chance) SnailMail:
  525.  
  526.    Johan Torin
  527.    Fotstad
  528.    S-313 03 Åled
  529.    Sweden
  530.  
  531.